package com.xu.ai.chatclient.tools;

import java.time.LocalDateTime;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.context.i18n.LocaleContextHolder;

/**
 * 日期时间工具
 *
 * @author xuguan
 * @since 2025/9/17
 */
public class DateTimeTool implements ITool {

	@Tool(description = "获取用户时区的当前日期和时间")
	public String getCurrentDateTime() {
		return LocalDateTime.now().atZone(LocaleContextHolder.getTimeZone().toZoneId()).toString();
	}

}
